import axios from 'axios'
export const upbook = (data) => {
  return axios({
    method: 'post',
    url: '/api/qf_hotel/Order_add',
    headers: {
      contentType: 'application/json;charset=UTF-8'
    },
    params: {
      // data: JSON.stringify(data)
      // data
      // cardType: {
      //   id: data.cardType.id
      // },
      checkTime: data.checkTime,
      leaveTime: data.leaveTime,
      name: data.userName,
      cardTypeId: data.cardTypeId,
      cardNum: data.userIDcard,
      phone: data.userPhone,
      email: data.userEmail,
      people: data.people,
      child: data.child,
      finallmoney: data.money,
      remark: data.remark,
      serve: data.serve,
      roomId: data.roomId,
      userName: data.loginUserName,
      orderNo: data.payId,
      roomImage: data.image,
      roomName: data.roomTitle,
      payMoney: data.money
    }
  })
}

export const getData = (id) => {
  return axios({
    method: 'get',
    url: `/api/qf_hotel/findById_room?id=${id}`,
    query: {
      id
    }
  })
}
